查询索引GetTableIndex

版本要求 3.61.1

请求地址 http://URL/app/newoms.php/webservice/business/table/get-table-index?cmd=10022&ip-type=webservicerest&access-token=Token

请求参数

{  
    "app_id": 2, 
    "zone_id": 4,
    "table_name": "chat_area_rank"
}

返回说明 情况1: 成功 http状态码: 200

{
    "ret": 0,
    "info": {
        "app_id": 2,   // 业务id
        "zone_id": 4,  // 区服id
        "table_name": "chat_area_rank",  // 表名
        "table_index": {
            "DbTable": [
                {
                    "TablePrefix": "",
                    "SubTableCount": 0,
                    "ValueFields": {    // 表中哪些value字段配置了全局索引
                        "FieldNum": 0
                    },
                    "KeyFields": {      // 表中哪些key字段配置了全局索引
                        "FieldNum": 1,
                        "Field": [
                            {
                                "FieldName": "ChatAreaId",   // 字段名
                                "DbFieldName": ""
                            }
                        ]
                    },
                    "Deploy": {     // 部署信息,对于全局索引可以忽略该字段
                        "SubTableStorePlaceNum": 1,
                        "SubTableStorePlace": [
                            {
                                "SubTableIndexStart": 0,
                                "SubTableIndexEnd": 0,
                                "DbSourceName": "DbSource"
                            }
                        ]
                    }
                }
            ],
            "ShardNum": 1   // 全局索引的分片数
        }
    },
    "msg": ""
}

情况2: 失败, 原因是表没有部署索引 http状态码: 422 内容: "error:table have not been deployed table index."

results matching ""

    No results matching ""